VerificationViewModel

public final class VerificationViewModel extends ViewModel

This class contains all the methods regarding the verification of the certifications.

Constructors

VerificationViewModel
Link copied to clipboard
@Inject()
VerificationViewModel VerificationViewModel(PrefixValidationService prefixValidationService, Base45Service base45Service, CompressorService compressorService, CryptoService cryptoService, CoseService coseService, SchemaValidator schemaValidator, CborService cborService, VerifierRepository verifierRepository, Preferences preferences, DispatcherProvider dispatcherProvider)

Functions

checkExemptions
Link copied to clipboard
final CertificateStatus checkExemptions(List<Exemption> it, String scanMode)
This method checks the Exemption and returns a proper CertificateStatus after checking the validity start and end dates.
checkRecoveryStatements
Link copied to clipboard
final CertificateStatus checkRecoveryStatements(List<RecoveryModel> it, Certificate certificate, String scanMode)
This method checks the given recovery statements passed as a List of RecoveryModel and returns the proper status as CertificateStatus.
checkTests
Link copied to clipboard
final CertificateStatus checkTests(List<TestModel> it)
This method checks the given tests passed as a List of TestModel and returns the proper status as CertificateStatus.
checkVaccinations
Link copied to clipboard
final CertificateStatus checkVaccinations(List<VaccinationModel> it, String scanMode)
This method checks the given vaccinations passed as a List of VaccinationModel and returns the proper status as CertificateStatus.
clear
Link copied to clipboard
final Unit clear()
clearExtraTime
Link copied to clipboard
final String clearExtraTime(String strDateTime)
decode
Link copied to clipboard
final Unit decode(String code, Boolean fullModel, String scanMode)
extractExemption
Link copied to clipboard
final Array<ExemptionextractExemption(GreenCertificateData decodeData)
This method takes care of retrieving the Exemption from the json received by the Decoder library, and then returns it if present, otherwise it returns null.
extractUVCI
Link copied to clipboard
final String extractUVCI(GreenCertificate greenCertificate, Exemption exemption)
This method extracts the UCVI from an Exemption, Vaccine, Recovery or Test based on what was received.
get_certificate
Link copied to clipboard
final MutableLiveData<CertificateViewBeanget_certificate()
get_inProgress
Link copied to clipboard
final MutableLiveData<Booleanget_inProgress()
getAppMinVersion
Link copied to clipboard
final String getAppMinVersion()
getBase45Service
Link copied to clipboard
final Base45Service getBase45Service()
getCborService
Link copied to clipboard
final CborService getCborService()
getCertificate
Link copied to clipboard
final LiveData<CertificateViewBeangetCertificate()
getCertificateStatus
Link copied to clipboard
final CertificateStatus getCertificateStatus(CertificateModel cert)
This method checks the given CertificateModel and returns the proper status as CertificateStatus.
getCompressorService
Link copied to clipboard
final CompressorService getCompressorService()
getCoseService
Link copied to clipboard
final CoseService getCoseService()
getCryptoService
Link copied to clipboard
final CryptoService getCryptoService()
getDispatcherProvider
Link copied to clipboard
final DispatcherProvider getDispatcherProvider()
getFrontCameraStatus
Link copied to clipboard
final Boolean getFrontCameraStatus()
This method gets the current status of the camera stored in the Shared Preferences.
getInProgress
Link copied to clipboard
final LiveData<BooleangetInProgress()
getMolecularTestEndHour
Link copied to clipboard
final String getMolecularTestEndHour()
getMolecularTestStartHour
Link copied to clipboard
final String getMolecularTestStartHour()
getPreferences
Link copied to clipboard
final Preferences getPreferences()
getPrefixValidationService
Link copied to clipboard
final PrefixValidationService getPrefixValidationService()
getRapidTestEndHour
Link copied to clipboard
final String getRapidTestEndHour()
getRapidTestStartHour
Link copied to clipboard
final String getRapidTestStartHour()
getRecoveryCertEndDay
Link copied to clipboard
final String getRecoveryCertEndDay()
getRecoveryCertPvEndDay
Link copied to clipboard
final String getRecoveryCertPvEndDay()
getRecoveryCertPVStartDay
Link copied to clipboard
final String getRecoveryCertPVStartDay()
getRecoveryCertStartDay
Link copied to clipboard
final String getRecoveryCertStartDay()
getScanMode
Link copied to clipboard
final String getScanMode()
getSchemaValidator
Link copied to clipboard
final SchemaValidator getSchemaValidator()
getSDKMinVersion
Link copied to clipboard
final String getSDKMinVersion()
This method invokes the getValidationRules method to obtain the validation rules and then extract from it the part regarding the minimum SDK version.
getTag
Link copied to clipboard
T getTag<T extends Any>(String p0)
getTotemMode
Link copied to clipboard
final Boolean getTotemMode()
This method gets the current status of the totem mode stored in the Shared Preferences.
getVaccineEndDayComplete
Link copied to clipboard
final String getVaccineEndDayComplete(String vaccineType)
getVaccineEndDayNotComplete
Link copied to clipboard
final String getVaccineEndDayNotComplete(String vaccineType)
getVaccineStartDayComplete
Link copied to clipboard
final String getVaccineStartDayComplete(String vaccineType)
getVaccineStartDayNotComplete
Link copied to clipboard
final String getVaccineStartDayNotComplete(String vaccineType)
getValidationRules
Link copied to clipboard
final Array<RulegetValidationRules()
This method gets the validation rules from the Shared Preferences as a JSON String, deserializing it in an Array of type Rule.
getVerifierRepository
Link copied to clipboard
final VerifierRepository getVerifierRepository()
init
Link copied to clipboard
final Unit init(String qrCodeText, Boolean fullModel)
This method checks if the SDK version is obsoleted; if not, the decode method is called.
isCertificateRevoked
Link copied to clipboard
final Boolean isCertificateRevoked(String hash)
isDownloadInProgress
Link copied to clipboard
final Boolean isDownloadInProgress()
isRecoveryBis
Link copied to clipboard
final Boolean isRecoveryBis(List<RecoveryModel> recoveryStatements, Certificate cert)
isSDKVersionObsoleted
Link copied to clipboard
final Boolean isSDKVersionObsoleted()
This method invokes the getSDKMinVersion method to obtain the minimum SDK version and then compare it with the current SDK version in use.
onCleared
Link copied to clipboard
Unit onCleared()
setFrontCameraStatus
Link copied to clipboard
final Unit setFrontCameraStatus(Boolean value)
This method sets the current status of the camera stored in the Shared Preferences.
setTagIfAbsent
Link copied to clipboard
T setTagIfAbsent<T extends Any>(String p0, T p1)
setTotemMode
Link copied to clipboard
final Unit setTotemMode(Boolean value)
This method sets the current status of the totem mode stored in the Shared Preferences.

Properties

_certificate
Link copied to clipboard
private final MutableLiveData<CertificateViewBean_certificate
_inProgress
Link copied to clipboard
private final MutableLiveData<Boolean_inProgress
base45Service
Link copied to clipboard
private final Base45Service base45Service
cborService
Link copied to clipboard
private final CborService cborService
certificate
Link copied to clipboard
private final LiveData<CertificateViewBeancertificate
compressorService
Link copied to clipboard
private final CompressorService compressorService
coseService
Link copied to clipboard
private final CoseService coseService
cryptoService
Link copied to clipboard
private final CryptoService cryptoService
dispatcherProvider
Link copied to clipboard
private final DispatcherProvider dispatcherProvider
inProgress
Link copied to clipboard
private final LiveData<BooleaninProgress
mBagOfTags
Link copied to clipboard
private final Map<String, ObjectmBagOfTags
mCleared
Link copied to clipboard
private final Boolean mCleared
preferences
Link copied to clipboard
private final Preferences preferences
prefixValidationService
Link copied to clipboard
private final PrefixValidationService prefixValidationService
schemaValidator
Link copied to clipboard
private final SchemaValidator schemaValidator
verifierRepository
Link copied to clipboard
private final VerifierRepository verifierRepository